package com.guliguli.guliguliproduct.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guliguli.guligulicommon.utils.PageUtils;
import com.guliguli.guliguliproduct.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author liuhuijie
 * @email hiliuhuijie@163.com
 * @date 2020-11-16 14:19:23
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenusByCid(List<Long> asList);

    /**
     * 用普通方法查出所有分类树形集合，解决用Stream方法导致数据缺失问题
     */
    List<CategoryEntity> listWithTreeNoStream();

    /**
     * 查出分类路径
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);
}

